﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AdmNoticeManage.aspx.cs"
    Inherits="LMS.SMSH.WEB.AdmNoticeManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div align="center">
        <table width="700" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td height="30" align="left" style="width: 120px">
                    &nbsp;&nbsp;<strong>信息管理</strong>
                </td>
                <td height="30" align="right" style="width: 580px">
                    <font size="2">信息标题<asp:TextBox ID="txtCaption" runat="server" Columns="6" MaxLength="50"
                        Width="200px"></asp:TextBox>&nbsp;&nbsp; 所属类别</font>
                    <asp:DropDownList ID="ddlInfo" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlInfo_SelectedIndexChanged">
                        <asp:ListItem Text="紧急通知" Value="1"></asp:ListItem>
                        <asp:ListItem Text="普通通知" Value="0"></asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btnFind" runat="server" OnClick="btnFind_Click" Text="搜 索" />
                    &nbsp;&nbsp;
                    <asp:Button ID="btnAddNotice" runat="server" OnClick="btnAddNotice_Click" Text="新 增" />&nbsp;
                </td>
            </tr>
            <tr>
                <td height="30" colspan="2" align="left">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:GridView ID="gvInfo" runat="server" AutoGenerateColumns="False" BorderColor="Black"
                                Width="700px" AllowPaging="True" OnPageIndexChanging="gvInfo_PageIndexChanging"
                                OnRowDataBound="gvInfo_RowDataBound" PageSize="5">
                                <RowStyle BackColor="Orange" Font-Size="Small" />
                                <Columns>
                                    <asp:TemplateField HeaderText="行编号">
                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="8%" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="8%" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="全选">
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="chkHeader" runat="server" Text="全选" AutoPostBack="true" OnCheckedChanged="chkHeader_CheckedChanged" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkItem" runat="server" Text="" AutoPostBack="true" />
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="60px" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="60px" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="infotitle" HeaderText="信息标题">
                                        <HeaderStyle HorizontalAlign="Center" Width="20%" />
                                        <ItemStyle HorizontalAlign="Center" Width="20%" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="信息类别">
                                        <ItemTemplate>
                                            <%#GetgvInfoType(bool.Parse(Eval("infoType").ToString()))%>
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" Width="12%" />
                                        <ItemStyle HorizontalAlign="Center" Width="12%" />
                                    </asp:TemplateField>
                                    <asp:BoundField HeaderText="主要内容" DataField="infoDetail">
                                        <HeaderStyle HorizontalAlign="Center" Width="300px" />
                                        <ItemStyle HorizontalAlign="Center" Width="300px" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="编辑">
                                        <HeaderStyle HorizontalAlign="Center" Width="10%" />
                                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                                        <ItemTemplate>
                                            <asp:HyperLink ID="HyperLink1" Text="编辑" runat="server" 
                                            NavigateUrl='<%# "AdmIsuueNotice.aspx?InfoId=" + DataBinder.Eval(Container.DataItem,"InfoId") %>'></asp:HyperLink>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="删除">
                                        <HeaderStyle HorizontalAlign="Center" Width="10%" />
                                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                                        <ItemTemplate>
                                            <asp:Button ID="btnMyDelete" runat="server" CommandArgument='<%#Eval("infoId")%>'
                                                CommandName="btnMyDelete" Text="删除" OnClick="btnMyDelete_Click" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <HeaderStyle BackColor="OrangeRed" />
                                <AlternatingRowStyle BackColor="NavajoWhite" />
                                <PagerSettings FirstPageText="第一页" LastPageText="最后一页" Mode="NextPreviousFirstLast"
                                    NextPageText="下一页" PreviousPageText="上一页" />
                                <PagerStyle BackColor="#FFC080" Font-Size="Small" Font-Strikeout="False" Font-Underline="False"
                                    ForeColor="Black" HorizontalAlign="Center" VerticalAlign="Top" />
                            </asp:GridView>
                            <br />
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
